<!DOCTYPE html>
<html lang="zh-CN">
@include('index.head')

<body>
@include('index.topNav')
@if(session('__Ajax_RedirectFunc_status') == true)
    <div>
        <div class="alert alert-success alert-dismissible fade in" role="alert">
            <button type="button" class="close" data-dismiss="alert" aria-label="Close">
                <span aria-hidden="true">&times;</span>
            </button>
            <h3>成功</h3>
            <p><?php echo session('__Ajax_RedirectFunc_message');?></p>
            <p><?php echo session('__Ajax_RedirectFunc_plugin');?></p>
        </div>
    </div>
@endif
@if(session('__Ajax_RedirectFunc_status') === false)
    <div >
        <div class="alert alert-danger alert-dismissible fade in" role="alert">
            <button type="button" class="close" data-dismiss="alert" aria-label="Close">
                <span aria-hidden="true">&times;</span>
            </button>
            <h3>失败</h3>
            <p><?php echo session('__Ajax_RedirectFunc_message');?></p>
            <p><?php echo session('__Ajax_RedirectFunc_plugin');?></p>
        </div>
    </div>
@endif
<div class="container">

                {{--@foreach($serviceData as $data)
                    <div class="col-md-12" style="text-align: center">
                        <div class="col-md-7" style="background: #2D93CA;height: 50px">
                            <p></p>
                            <a href="/serviceInfo/{{$data->service_id}}" style="color: white;font-size: 24px">{{$data->service_name}}</a>
                        </div>
                        <div class="col-md-3" style="background:#ffb312;height: 50px">
                            <p style="color: red">{{$data->service_price}} 元 / 张</p>
                            <a href="/shop/{{$data->shop_id}}">{{$data->shop_name}}</a>
                        </div>
                        <div class="col-md-2" style="background:red;height: 50px">
                            <p></p>
                            <p style="color: white;font-size: 24px">{{$data->service_number}}人已购买</p>
                        </div>
                    </div>
                    <div class="col-md-12" style="height: 5px"></div>
                @endforeach
--}}
                @foreach($serviceData as $data)
                            <div class="col-sm-6 col-md-4">
                                <div class="thumbnail">
                                    <img src="{{asset("/images/$data->shop_img")}}" alt="...">
                                    <div class="caption">
                                        <h3><a href="/serviceInfo/{{$data->service_id}}">{{$data->service_name}}</a></h3>
                                        <p><span style="color: red">{{$data->service_price}}</span> 元 / 张</p>
                                        <p>{{$data->service_number}}人已购买</p>
                                        <p>进入店铺：<a href="/shop/{{$data->shop_id}}" >{{$data->shop_name}}</a></p>
                                        <p><a href="/serviceInfo/{{$data->service_id}}" class="btn btn-default" role="button">详情</a></p>
                                    </div>
                                </div>
                            </div>
                @endforeach
</div> <!-- /container -->
</body>
</html>